#include "MovieControlState.h"

MovieControlState::MovieControlState(Movie*& movie, Scene*& scene, const IPaddress& addr) : movie(movie),scene(scene),addr(addr)
{

}

std::string MovieControlState::sceneFilePath()
{
	if (movie && scene) {
		return movie->absolutePath(scene->getFilePath());
	}
	return std::string();
}

const IPaddress& MovieControlState::getAddress()
{
	return addr;
}

const uint64_t MovieControlState::getMovieId()
{
	if (movie) {
		return movie->getId();
	}
	return 0;
}

const int MovieControlState::getScene()
{
	if (scene) {
		return scene->getSequence();
	}
	return 0;
}

void MovieControlState::setPlayer(Player* player)
{
	this->player = player;
}

Player* MovieControlState::getPlayer() const
{
	return player;
}

void MovieControlState::setTimerId(int timerId)
{
	this->timerId = timerId;
}

int MovieControlState::getTimerId() const
{
	return timerId;
}
